package org.posupe.curriculos;

import java.util.Iterator;
import java.util.Vector;

public class IteratorCurriculosVector implements IteratorCurriculos {

	private Vector curriculos;
	private int atual; 
	
	public IteratorCurriculosVector() {
		this.curriculos = new Vector();
	}
	
	public boolean hasNext() {		
		return this.atual < this.curriculos.size();
	}

	public Curriculo next() {
		Curriculo curriculo = ((Curriculo) this.curriculos.get(this.atual)); 
		this.atual++;
		return curriculo;
	}
	
	public void add(Curriculo curriculo) {		
		this.curriculos.add(curriculo);
	}

	public Iterator iterator() {
		return curriculos.iterator();
	}

}
